package com.wz.project.mydo.mydojobdetail.service;

import com.wz.common.utils.text.Convert;
import com.wz.project.mydo.domain.MydoJobDetail;
import com.wz.project.mydo.mydojobdetail.mapper.JobDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作业详情 服务层实现
 * 
 * @author sys
 * @date 2021-10-28
 */
@Service
public class JobDetailServiceImpl implements IJobDetailService 
{
	@Autowired
	private JobDetailMapper jobDetailMapper;

	/**
     * 查询作业详情信息
     * 
     * @param jobDetailId 作业详情ID
     * @return 作业详情信息
     */
    @Override
	public MydoJobDetail selectJobDetailById(String jobDetailId)
	{
	    return jobDetailMapper.selectJobDetailById(jobDetailId);
	}
	@Override
	public MydoJobDetail selectJobDetailByIds(String jobDetailId)
	{
	    return jobDetailMapper.selectJobDetailByIds(jobDetailId);
	}

	@Override
	public List<MydoJobDetail> selectJobDetailByjobid(String jobId)
	{
		return jobDetailMapper.selectJobDetailByjobid(jobId);
	}
	
	/**
     * 查询作业详情列表
     * 
     * @param jobDetail 作业详情信息
     * @return 作业详情集合
     */
	@Override
	public List<MydoJobDetail> selectJobDetailList(MydoJobDetail jobDetail)
	{
	    return jobDetailMapper.selectJobDetailList(jobDetail);
	}
	
    /**
     * 新增作业详情
     * 
     * @param jobDetail 作业详情信息
     * @return 结果
     */
	@Override
	public int insertJobDetail(MydoJobDetail jobDetail)
	{
	    return jobDetailMapper.insertJobDetail(jobDetail);
	}
	
	/**
     * 修改作业详情
     * 
     * @param jobDetail 作业详情信息
     * @return 结果
     */
	@Override
	public int updateJobDetail(MydoJobDetail jobDetail)
	{
	    return jobDetailMapper.updateJobDetail(jobDetail);
	}

	/**
     * 删除作业详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteJobDetailByIds(String ids)
	{
		return jobDetailMapper.deleteJobDetailByIds(Convert.toStrArray(ids));
	}

	@Override
	public int deleteJobDetailByshanchu(String product,String barcodeDetail)
	{
		return jobDetailMapper.deleteJobDetailByshanchu(product,barcodeDetail);
	}

	@Override
	public List<MydoJobDetail> selectJobDetailListFinish(String jobId) {
		return jobDetailMapper.selectJobDetailListFinish(jobId);
	}

	@Override
	public MydoJobDetail selectJobDetailFinishById(String jobDetailId) {
		return jobDetailMapper.selectJobDetailFinishById(jobDetailId);
	}

	@Override
	public int selectJobDetailByBarcode(String fbarcode) {
		return jobDetailMapper.selectJobDetailByFbarcodeCount(fbarcode);
	}
}
